<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<style>
</style>
<script type="text/javascript">
    $(function() {
        $('#codeCategoryAddForm').form({
            url : '${path}/code/codeCategory/add',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    showMsg(result.msg);
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    var form = $('#codeCategoryAddForm');
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
    });
</script>
<div class="easyui-layout" data-options="fit:true,border:false" >
    <div data-options="region:'center',border:false" style="overflow-x:hidden;overflow-y: auto;padding: 3px;" >
        <form id="codeCategoryAddForm" method="post">
            <table class="grid">
 <tr>
                     <td>类别编码</td>
                      <td>
                        <input name='category' id='codeCategory_category'  type='text' placeholder='请输入类型' class='easyui-text-2  easyui-validatebox span2' data-options="required:true">
                     </td>
                      <td>类别名称</td>
                      <td>
                        <input name='categoryName' id='codeCategory_categoryName'  type='text' placeholder='请输入类型名称' class='easyui-text-2  easyui-validatebox span2' data-options="required:true">
                     </td>
                  </tr> <tr>
                     <td>备注</td>
                      <td colspan="3">
                        <textarea name='remark' id='codeCategory_remark'  placeholder='请输入备注' class='easyui-text-2  span2' style="width:95%;min-height:100px;"></textarea>
                     </td></tr>

            </table>
        </form>
    </div>
</div>